package chapter1;

public class Static {

	static{
		x=5;
	}
	static String c1="WWW";
	static int x,y;
	
	static void myMethod(){
		y= x++ + ++x;
	}
	
	public static void main(String args[]){
		x--;
		myMethod();
		System.out.println(x + y + ++x);
		Byte byte1 = new Byte("111");
		
		if(byte1.toString()==byte1.toString()){
			System.out.println("true1");
		}
		if (Test4.c1==c1){
			System.out.println("true2");
		}
		String c2 ="WWW";
		if (c1==c2){
			System.out.println("true static and non without new String.3");
		}
		String c3 = new String(c1);
		if (c3==c1){
			System.out.println("true static and non with new String.4");
		}
	}
}

class Test4{
	static String c1="WWW";
}
